
package ATBMS.modles.DAO;

import ATBMS.modles.Flight;

import java.util.List;

/**
 * Flight DAO Interface
 */
public interface FlightDAO {

    /**
     * put a Flight Object into database
     * @param flight
     * @return succeed or failed
     */
    public boolean insert(Flight flight);

    /**
     * Update a Flight Object
     * @param fid
     * @param flight
     * @return
     */
    public boolean update(int fid, Flight flight);

    /**
     * Delete a Flight Object
     * @param fid
     */
    public void delete(int fid);

    /**
     * Retrieve All Flight Object
     * @return
     */
    public List<Flight> findAll();

    /**
     * Find Flight By Flight Code
     * @param code
     * @return
     */
    public Flight findByFlightCode(String code);
}
